package Model;

/**
 *
 * @author Simon Marshall
 * @author jc209673
 */
public class TrafficLight {

    // Red, Yellow and Green states
    // When Red: cars do not proceed into intersection and wait until green.
    // When Yellow: cars may not proceed through intersection.
    // When Green: cars proceed as normal.
    // Simulator calls and view will read - implement this.

    //                              TrafficLight.java Logic

    // 1. Running on a 10 second cycle; 7 seconds on Green, 3 Seconds on Yellow and 10 seconds on Red and repeat for both lanes
    // 2. One Timer and TimerTask will control both lights - IMPLEMENTED
    // 3. Have a line appear on Horizontal and Vertical when the light state is Yellow or Red to act like a boomgate and not allow a vehicle through
    
    /**
     * sets the Red light state as an int for the if loop to display the light state
     */
    public static final int RED = 1;
    /**
     * sets the Yellow light state as an int for the if loop to display the light state
     */
    public static final int YELLOW = 2;
    /**
     * sets the Green light state as an int for the if loop to display the light state
     */
    public static final int GREEN = 3;
    private int activeColor;

    /**
     *
     * @return the active colour of the light state
     */
    public int getColor() {
        return activeColor;
    }

    /**
     *
     * @param value set the active colour of the light state using final ints above
     */
    public void setColor(int value) {
        activeColor = value;
    }
}
